package org.theqcp.wow.sim.gui.tabs;

import javax.swing.BoxLayout;
import javax.swing.JPanel;
import javax.swing.border.TitledBorder;

import org.theqcp.wow.sim.gui.DataPoint;
import org.theqcp.wow.sim.gui.EnhSimGUIFrame;

public class Talents extends DataPanel {

    private static final long serialVersionUID = 2179287833599665863L;

    protected final String[] one = new String[] { "0", "1" };
    protected final String[] two = new String[] { "0", "1", "2" };
    protected final String[] three = new String[] { "0", "1", "2", "3" };
    protected final String[] five = new String[] { "0", "1", "2", "3", "4", "5" };

    public Talents(EnhSimGUIFrame esgFrame) {
	fieldNames.put("Convection", DataPoint.convection);
	fieldNames.put("Concussion", DataPoint.concussion);
	fieldNames.put("Call of Flame", DataPoint.call_of_flame);
	fieldNames.put("Elemental Devastation", DataPoint.elemental_devastation);
	fieldNames.put("Reverberation", DataPoint.reverberation);
	fieldNames.put("Elemental Focus", DataPoint.elemental_focus);
	fieldNames.put("Elemental Fury", DataPoint.elemental_fury);
	fieldNames.put("Call of Thunder", DataPoint.call_of_thunder);
	fieldNames.put("Unrelenting Storm", DataPoint.unrelenting_storm);
	fieldNames.put("Elemental Precision", DataPoint.elemental_precision);
	fieldNames.put("Lightning Mastery", DataPoint.lightning_mastery);
	fieldNames.put("Elemental Oath", DataPoint.elemental_oath);
	fieldNames.put("Lightning Overload", DataPoint.lightning_overload);
	fieldNames.put("Lava Flows", DataPoint.lava_flows);
	fieldNames.put("Storm, Earth and Fire", DataPoint.storm_earth_and_fire);

	esgFrame.addTalent(DataPoint.convection, DataPoint.concussion, DataPoint.call_of_flame,
		DataPoint.elemental_devastation, DataPoint.reverberation, DataPoint.elemental_focus,
		DataPoint.elemental_fury, DataPoint.call_of_thunder, DataPoint.unrelenting_storm,
		DataPoint.elemental_precision, DataPoint.lightning_mastery, DataPoint.elemental_oath,
		DataPoint.lightning_overload, DataPoint.lava_flows, DataPoint.storm_earth_and_fire);

	fieldNames.put("Ancestral Knowledge", DataPoint.ancestral_knowledge);
	fieldNames.put("Improved Shields", DataPoint.improved_shields);
	fieldNames.put("Mental Dexterity", DataPoint.mental_dexterity);
	fieldNames.put("Shamanistic Focus", DataPoint.shamanistic_focus);
	fieldNames.put("Flurry", DataPoint.flurry);
	fieldNames.put("Elemental Weapons", DataPoint.elemental_weapons);
	fieldNames.put("Unleashed Rage", DataPoint.unleashed_rage);
	fieldNames.put("Weapon Mastery", DataPoint.weapon_mastery);
	fieldNames.put("DW Specialization", DataPoint.dual_wield_specialization);
	fieldNames.put("Mental Quickness", DataPoint.mental_quickness);
	fieldNames.put("Improved Stormstrike", DataPoint.improved_stormstrike);
	fieldNames.put("Static Shock", DataPoint.static_shock);
	fieldNames.put("Maelstrom Weapon", DataPoint.maelstrom_weapon);

	esgFrame.addTalent(DataPoint.ancestral_knowledge, DataPoint.improved_shields, DataPoint.mental_dexterity,
		DataPoint.shamanistic_focus, DataPoint.flurry, DataPoint.elemental_weapons, DataPoint.unleashed_rage,
		DataPoint.weapon_mastery, DataPoint.dual_wield_specialization, DataPoint.mental_quickness,
		DataPoint.improved_stormstrike, DataPoint.static_shock, DataPoint.maelstrom_weapon);

	setupFrame(esgFrame);
    }

    private void setupFrame( EnhSimGUIFrame esgFrame ) {
	JPanel elemental = new JPanel();
	elemental.setLayout(new BoxLayout(elemental, BoxLayout.Y_AXIS));
	elemental.setBorder(new TitledBorder("Elemental"));
	add(elemental);

	JPanel enhancement = new JPanel();
	enhancement.setLayout(new BoxLayout(enhancement, BoxLayout.Y_AXIS));
	enhancement.setBorder(new TitledBorder("Enhancement"));
	add(enhancement);

	elemental.add(makeComboBox(esgFrame, "Convection", five));
	elemental.add(makeComboBox(esgFrame, "Concussion", five));
	elemental.add(makeComboBox(esgFrame, "Call of Flame", three));
	elemental.add(makeComboBox(esgFrame, "Elemental Devastation", three));
	elemental.add(makeComboBox(esgFrame, "Reverberation", five));
	elemental.add(makeComboBox(esgFrame, "Elemental Focus", one));
	elemental.add(makeComboBox(esgFrame, "Elemental Fury", five));
	elemental.add(makeComboBox(esgFrame, "Call of Thunder", one));
	elemental.add(makeComboBox(esgFrame, "Unrelenting Storm", five));
	elemental.add(makeComboBox(esgFrame, "Elemental Precision", three));
	elemental.add(makeComboBox(esgFrame, "Lightning Mastery", five));
	elemental.add(makeComboBox(esgFrame, "Elemental Oath", two));
	elemental.add(makeComboBox(esgFrame, "Lightning Overload", five));
	elemental.add(makeComboBox(esgFrame, "Lava Flows", three));
	elemental.add(makeComboBox(esgFrame, "Storm, Earth and Fire", five));

	enhancement.add(makeComboBox(esgFrame, "Ancestral Knowledge", five));
	enhancement.add(makeComboBox(esgFrame, "Improved Shields", three));
	enhancement.add(makeComboBox(esgFrame, "Mental Dexterity", three));
	enhancement.add(makeComboBox(esgFrame, "Shamanistic Focus", one));
	enhancement.add(makeComboBox(esgFrame, "Flurry", five));
	enhancement.add(makeComboBox(esgFrame, "Elemental Weapons", three));
	enhancement.add(makeComboBox(esgFrame, "Unleashed Rage", five));
	enhancement.add(makeComboBox(esgFrame, "Weapon Mastery", three));
	enhancement.add(makeComboBox(esgFrame, "DW Specialization", three));
	enhancement.add(makeComboBox(esgFrame, "Mental Quickness", three));
	enhancement.add(makeComboBox(esgFrame, "Improved Stormstrike", two));
	enhancement.add(makeComboBox(esgFrame, "Static Shock", three));
	enhancement.add(makeComboBox(esgFrame, "Maelstrom Weapon", five));
    }

}
